package com.shoesmail.controller;

import com.shoesmail.annotation.JwtToken;
import com.shoesmail.domain.vo.JsonResultVo;
import com.shoesmail.domain.vo.user.UserOrderVo;
import com.shoesmail.enums.RoleEnum;
import com.shoesmail.service.UserOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ：CDB
 * @description 用户订单相关
 * @date ：2025/9/18 10:28
 */
@RestController
@RequestMapping("/user/order")
public class UserOrderController {

    @Autowired
    private UserOrderService userOrderService;

    @GetMapping("/getList")
    @JwtToken(role = RoleEnum.USER)
    public JsonResultVo<List<UserOrderVo>> getOrders(){
        return userOrderService.getOrder();
    }

}
